load("@fbsource//tools/build_defs:rust_library.bzl", "rust_library")

oncall("scm_client_infra")

rust_library(
    name = "edenfs-commands",
    srcs = glob(["src/**/*.rs"]),
    named_deps = {
        "hg_util": "//eden/scm/lib/util:util",
    },
    os_deps = [
        (
            "linux",
            [
                "fbsource//third-party/rust:shlex",
            ],
        ),
        (
            "macos",
            [
                "fbsource//third-party/rust:shlex",
                "fbsource//third-party/rust:glob",
            ],
        ),
    ],
    test_deps = [
        "fbsource//third-party/rust:tempfile",
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:blake3",
        "fbsource//third-party/rust:clap-3",
        "fbsource//third-party/rust:colored",
        "fbsource//third-party/rust:comfy-table",
        "fbsource//third-party/rust:crossterm",
        "fbsource//third-party/rust:ctrlc",
        "fbsource//third-party/rust:dialoguer",
        "fbsource//third-party/rust:dunce",
        "fbsource//third-party/rust:fail",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:hex",
        "fbsource//third-party/rust:indicatif",
        "fbsource//third-party/rust:num-format",
        "fbsource//third-party/rust:once_cell",
        "fbsource//third-party/rust:rand",
        "fbsource//third-party/rust:rusqlite",
        "fbsource//third-party/rust:serde",
        "fbsource//third-party/rust:serde_json",
        "fbsource//third-party/rust:subprocess",
        "fbsource//third-party/rust:sysinfo",
        "fbsource//third-party/rust:tabular",
        "fbsource//third-party/rust:termwiz",
        "fbsource//third-party/rust:tokio",
        "fbsource//third-party/rust:tokio-util",
        "fbsource//third-party/rust:toml",
        "fbsource//third-party/rust:tracing",
        "//common/rust/lmdb:lmdb",
        "//common/rust/rocksdb:rocksdb",
        "//eden/fs/cli_rs/edenfs-client:edenfs-client",
        "//eden/fs/cli_rs/edenfs-error:edenfs-error",
        "//eden/fs/cli_rs/edenfs-utils:edenfs-utils",
        "//eden/fs/rust/edenfs-asserted-states:edenfs-asserted-states",
        "//eden/fs/rust/edenfs-asserted-states-client:edenfs-asserted-states-client",
        "//eden/fs/rust/facebook/edenfs-telemetry:edenfs-telemetry",
        "//eden/scm/lib/io:io",
        "//eden/scm/lib/io/term/logger:termlogger",
        "//eden/scm/lib/thrift-types:thrift-types",
    ],
)
